<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <!-- 上述3个meta标签*必须*放在最前面，任何其他内容都*必须*跟随其后！ -->
    <title>CMS前台用户注册</title>

    <!-- Bootstrap -->
    <link href="__PUBLIC__/vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">
    <link rel="stylesheet" href="__PUBLIC__/assets/admin/css/common.css">
</head>
<body>
<div class="container"style="width:880px;">
    <h2 style="text-align: center;">用户注册</h2>
    <div style="margin_left:500px;">
        <form class="form-horizontal" action="__SELF__" method="post">
            <div class="form-group">
                <label class="col-sm-2 control-label register_user ">用户名</label>
                <div class="col-sm-6">
                    <input type="text" class="form-control" name="username" placeholder="请输入用户名">
                </div>
            </div>
            <div class="form-group">
                <label for="thumb" class="col-sm-2 control-label register_user">我的头像</label>
                <div class="col-sm-4">
                    <input type="text" id="thumb" class="form-control" name="thumb"  placeholder="请上传头像">
                </div>
                <div class="col-sm-2">
                    <input type="button" value="上 传" id="ck_thumb_upload"  class="btn btn-success"/>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label register_user">密 码</label>
                <div class="col-sm-6">
                    <input type="password" class="form-control" name="password" placeholder="请输入密码">
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-2 control-label register_user">确认密码</label>
                <div class="col-sm-6">
                    <input type="password" class="form-control" name="check_password" placeholder="请输入密码">
                </div>
            </div>
            <div class="form-group">
                <div class="col-sm-offset-2 col-sm-10">
                    <button type="submit" class="btn btn-info">注 册</button>
                </div>
            </div>
        </form>
        <div>
            <a href="{{:U('login')}}" style="float: right;">如有账号，请点击登录~</a>
        </div>
    </div>
</div>

<!-- jQuery (necessary for Bootstrap's JavaScript plugins) -->
<script src="https://cdn.bootcss.com/jquery/1.12.4/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="__PUBLIC__/vendor/bootstrap/js/bootstrap.min.js"></script>
<script src="__PUBLIC__/vendor/ckeditor/ckeditor.js"></script>
<script src="__PUBLIC__/vendor/ckfinder/ckfinder.js"></script>
<script>
    $(function () {
        //上传缩略图（单张图片）
        $("#ck_thumb_upload").click(function () {
            CKFinder.modal({
                chooseFiles: true,
                language: 'zh-cn',
                onInit: function (finder) {
                    finder.on('files:choose', function (evt) {
                        var url = evt.data.files.first().getUrl();
                        $("#thumb").val(url);
                        $("#img_show").attr('src', url);
                    });
                }
            });
        });

    })
</script>
</body>
</html>